from models.BaseDto import *

class DemoDto:
	count = 123
	
	def getString(self):
		return "获取一个字符串"
	
	def getString1():
		return "获取一个字符串"

class DemoNew:
	'类型实例化'
	demoString = '我是类型 DemoNew 中的 demoString 属性'
	__demoString = '我是类型 DemoNew 中的 __demoString 属性'

	def demoFunction1(self):
		return self.__demoString

	def setDemoFunction1(self,string):
		self.__demoString = string
		return

	def getFunction2(self):
		return demoString

class DemoInit:
    '类型Init'
    def __init__(self, realpart, imagpart):
        self.r = realpart
        self.i = imagpart


    def getR(self):
        return self.r


class DemoInit1:
    '哈哈哈哈哈哈哈'
    a = 'aaaa'
    b = 321
    def __init__(self,aa,bb):
        self.name = aa
        self.age = bb

    def getName(self):
        return self.name

    def getA(self):
        return self.a


class UserInfo(BaseModel):
    'UserInfo 继承 BaseModel'
    def getString(self):
        return "getStringssss....."
    
    def getModelType(self):
        return self.modelType

    def getModelId(self):
        return self.modelId

class UserInfo2(BaseDto):
    '初始化 父类的 Init 方法'
    def __init__(self, id, type,name):
        BaseDto.__init__(self,id,type)
        self.name = name

    def speak(self):
        return "ModelId: %d,ModelType: %s,Name: %s" % (self.id,self.type,self.name)

class UserInfo3(BaseDto,BaseModel):
    def __init__(self, id, type):
        BaseDto.__init__(self,id,type)

    def speak(self):
        return "ModelId: ,ModelType: {1}" + self.type;

    def sssss(self):
        return "看看会不会报错";
